<template>
  <div class="code">
    <div>
      <img :src="url" alt="" >

    </div>
    </div>
</template>

<script>
import {qrcode} from "@/api/basicdata/user";

export default {
  name: "Code",
  data() {
    return {
      url:'',
      userId:null,
      aes:{
        user:'',
        task:'',
      },
      loading: false,
      captchaEnabled: true
    };
  },
  created() {
    this.aes.user = this.$route.query.user
    this.aes.task = this.$route.query.task
    this.getImgCode();
  },
  methods: {
    getImgCode() {
      console.log(this.aes)
      qrcode(this.aes).then(res =>{
        this.url = "data:image/png;base64, "+res.msg
      })
    },
  }
};
</script>

